import 'package:flutter/material.dart';
//颜色配置路径
import 'package:Smart/pages/productor008/project/res/res_colors.dart';
import 'package:Smart/utils/screen_unit/gs_screen_util.dart';

class GSBleButtonUtil {
// 弹框按钮的圆角设置
  BoxDecoration _bleCallButtonRadius(bool isSelected) {
    return BoxDecoration(
      //判断按钮是否被选中，来变换按钮的背景颜色
        color: isSelected ? ResColors.color_D7E600 : ResColors.color_FFFFFF,
        border: Border.all(color: ResColors.color_D1E000, width: 1),
        borderRadius: BorderRadius.all(Radius.circular(26.w)));
  }

// 弹框按钮的整体布局
  Widget bleCallButton(String title,
      {double width, double height, bool selected = false, onTap()}) {
    return GestureDetector(
      onTap: onTap,
      child: Container(
          width: width,
          height: height,
          alignment: Alignment.center,
          //_blueToothButtonRadius按钮圆角设置
          decoration: _bleCallButtonRadius(selected),
          child: Text(title,
              style: TextStyle(
                  decoration: TextDecoration.none,
                  fontSize: 18.w,
                  color: ResColors.color_141413,
                  fontWeight: FontWeight.w300))),
    );
  }
}

   

 